#include "apue.h"
int main(void) {
	int fd = open("test", O_APPEND|O_RDWR);
	char buf[100];
	off_t off = lseek(fd, -10, SEEK_END);
	read(fd, buf, 3);
	ssize_t n = write(fd, "123", 3);
	write(fd, "456", 3);
	printf("fd = %d, off = %d, buf = %s, n = %d\n", fd, off, buf, n);
}
